package club.janna.trace.service.e.impl;

import club.janna.trace.api.EService;
import club.janna.trace.service.domain.EEntity;
import club.janna.trace.service.e.mapper.EMapper;
import org.apache.dubbo.config.annotation.DubboService;
import org.springframework.beans.factory.annotation.Autowired;

/**
 * @author Panbo.Guo
 */
@DubboService
public class EServiceImpl implements EService {

    @Autowired
    private EMapper eMapper;

    @Override
    public String getValue(Long id) {
        EEntity a = eMapper.selectById(id);
        if(a == null)
            throw new RuntimeException("e not found! id -> " + id);
        return a.getValue();
    }
}
